// 车险订单数据， 时间格式化
import {formatDate}  from '@/utils/tools'
import loop from '@/utils/loop'

export default (ctx, next) =>{
    let resData  = ctx.params;
    
    // 时间地址
    let keys = [

        'SlastUpdateDate',
        'SDcreateAt',
        'SDlastEditAt',
        'SDapplyForReviewAt',
        'SDreviewingAt',
        'SDreviewedAt',

        'DupdateAt',
        'DEVissueDate',
        'DEVregisterDate',
        'DEVjqStartDate',
        'DEVsyStartDate',
        'DEVtransferedAt',
        
    ]

    keys.forEach(key =>{

        if(resData[key]){
            resData[key] = formatDate(new Date(resData[key]));
        }
        
    })

    next()
}